# -*- coding: utf-8 -*-
# Created by admin on 2020/3/28
# Copyright (c) 2020 admin. All rights reserved.
#分着读文件
f = None
try:
    f = open('readme.txt')
except FileNotFoundError:
    print("readme.txt不存在")
else:
    content=""
    while True:
        line = f.read(5)
        # if len(line)==0:   #line==""
        if line=="":
            break
        content+=line
        # print(line,end="")

    print(content)
finally:
    print('finally')
    if f:
        f.close()